package pres.man.interview.simple;

/**
 * @Author MAN
 * @Date 2021-01-20-16:42
 */
public class Strings {
    public static void main(String[] args) {
        string3();
    }

    private static void string1() {
        String a = "123";
        String b = "123";

        System.out.println(a == b);
    }

    private static void string2() {
        String a = "123";
        String b = new String("123");

        System.out.println(a == b);
    }

    private static void string3() {
        String a = "123";
        String b = new String("123");
        b = b.intern();

        System.out.println(a == b);
    }
}
